package org.idea.spring.bean.scope;

import org.springframework.beans.factory.InitializingBean;

/**
 * @Author linhao
 * @Date created in 1:47 下午 2021/5/2
 */
public class User implements InitializingBean {

    private long time;

    private String username;

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public User() {
    }

    public User(long time, String username) {
        this.time = time;
        this.username = username;
    }

    @Override
    public String toString() {
        return "User{" +
                "time=" + time +
                ", username='" + username + '\'' +
                '}';
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("==== afterPropertiesSet ====");
    }
}
